home *** CD-ROM | disk | FTP | other *** search
/ ShareWare OnLine 2 / ShareWare OnLine Volume 2 (CMS Software)(1993).iso / prog / cport2.zip / README.!!! < prev    next >
Text File  |  1993-04-09  |  2KB  |  77 lines

  1. This file contains important last minute information for Cport v2.0. 
  2. Please Take a moment to read it.
  3.  
  4.  
  5. General
  6. -------
  7.  
  8. -  Traditionally header files of a library are included as they are
  9.    needed like so. 
  10.       
  11.       #include "cport.h"
  12.       #include "xmodem.h"
  13.  
  14.    Problems sometimes arise when header files are not included in the 
  15.    correct order. To remedy this situation we added an alternative way 
  16.    of including header files. Instead of including each header file, 
  17.    only cport.h needs to be included and symbols are defined to inform
  18.    cport.h to include certain files.
  19.  
  20.       #define Uses_Xmodem  
  21.       #include "cport.h"
  22.  
  23.    'Uses_Xmodem' is currently the only symbol, but new ones will be
  24.    added as new features are added in subsequent versions.
  25.  
  26.  
  27. -  If you use the structure typedef 'CPARAM', make sure your compiler 
  28.    is generating byte alignment. For Borland C/C++ and Microsoft C/C++ 
  29.    this is taken care of. For other compilers check your documentation.
  30.  
  31.  
  32. C
  33. _
  34.  
  35. -  The documentation shows the function ComClose as returning 'void'.
  36.    It actually returns a NULL serial port handle (COM). This is so that 
  37.    a serial port handle may be optionally NULLed when the serial port is 
  38.    closed. NULLing a serial port handle can be used to mark it as unused.
  39.  
  40.    Example:
  41.       
  42.       int main()
  43.       {
  44.       COM com;
  45.          
  46.          com = ComOpen(COM1, B19200, W8|S1|NONE, 1024, 512);
  47.  
  48.  
  49.            ...later
  50.  
  51.             /* Close the serial port and NULL the serial port handle
  52.             */
  53.          com = ComClose(com); 
  54.  
  55.            ... continued
  56.  
  57. C++
  58. ---
  59.  
  60. -  Most C++ compilers pre-define the symbol '__cplusplus'. Cport
  61.    looks for this symbol to detect a C++ compile. If your C++ compiler 
  62.    does not define this symbol, simply define it before you include
  63.    cport.h.
  64.  
  65.       #define __cplusplus
  66.       #include "cport.h"
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73.  
  74.  
  75.  
  76.  
  77.